<?php

$flag = true;
$file = './runtime/large_data.txt';

$fd = fopen($file, 'a+');
$line = 0;
while ($line < 5000000) {
    fwrite($fd, rand(1000, 9999) . PHP_EOL);
    $line++;
}
fclose($fd);